import 'dart:typed_data';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_exif_plugin/flutter_exif_plugin.dart';

void main() {
  const MethodChannel channel = MethodChannel('flutter_exif_plugin');

  TestWidgetsFlutterBinding.ensureInitialized();

  setUp(() {
    channel.setMockMethodCallHandler((MethodCall methodCall) async {
      return '42';
    });
  });

  tearDown(() {
    channel.setMockMethodCallHandler(null);
  });

  test('Test setAttribute', () async {
    final exif = FlutterExif.fromBytes(Uint8List(0));
    expect(() async => await exif.setAttribute('UserComment', 'test value'), returnsNormally);
  });
}
